package cn.iocoder.yudao.adminserver.modules.live.dal.mysql.projectPlanEvent;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.adminserver.modules.live.dal.dataobject.projectPlanEvent.LiveProjectPlanEventDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.adminserver.modules.live.controller.projectPlanEvent.vo.*;

/**
 * 项目阶段事项 Mapper
 *
 * @author 芋艿
 */
@Mapper
public interface LiveProjectPlanEventMapper extends BaseMapperX<LiveProjectPlanEventDO> {

    default PageResult<LiveProjectPlanEventDO> selectPage(LiveProjectPlanEventPageReqVO reqVO) {
        return selectPage(reqVO, new QueryWrapperX<LiveProjectPlanEventDO>()
                .eqIfPresent("read_flag", reqVO.getReadFlag())
                .orderByDesc("id")        );
    }

    default List<LiveProjectPlanEventDO> selectList(LiveProjectPlanEventExportReqVO reqVO) {
        return selectList(new QueryWrapperX<LiveProjectPlanEventDO>()
                .eqIfPresent("read_flag", reqVO.getReadFlag())
                .orderByDesc("id")        );
    }

}
